package com.site.common;

/** 加锁工具
 * author xiaochi
 * date 2024/8/2
 */
public class LockUtil {

    private static final byte[] lock = new byte[0];

    /**
     * 加锁执行
     */
    public static void run(Runnable runnable){
        synchronized (lock){
            runnable.run();
        }
    }
}
